/**
 * Created by mapbar_front on 2019/8/13.
 */
import React,{Component} from 'react';
import {
    BrowserRouter as Router,
    Link,
    Route,
} from 'react-router-dom';
import Home from './../apps/Home';

const router = [
    {
        path:'/',
        exact: true,
        component:Home
    },
]
class RouterMap extends Component{
    render(){
        return(
            <Router>
                <div>
                    <ul>
                        <li><Link to="/">Home</Link></li>
                    </ul>
                    {
                        router.map((route,i)=>{
                            return <Route
                                        key={i}
                                        exact={route.exact}
                                        path={route.path}
                                        component={route.component}
                                    />
                        })
                    }
                </div>
            </Router>
        )
    }
}
export default RouterMap;


